package org.example.controller;

import org.example.domain.CarType;
import org.example.service.CarTypeService;
import org.example.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("carType")
public class CarTypeController {
    @Autowired
    CarTypeService carTypeService;


    @RequestMapping("carTypeList")
    public Result carTypeList(){
        List<CarType> list =  carTypeService.list();
        return Result.success(list);
    }
}
